// Device_M2K.h: interface for the Device_M2K class.
//
//////////////////////////////////////////////////////////////////////

#ifndef __DEVICE_M2K_H__
#define __DEVICE_M2K_H__

#include "VDevicePhone.h"
#include "_Beeper.h"

class Device_M2K;
typedef _Beeper<Device_M2K>		_M2K_Beeper;

class Device_M2K : public _VDevicePhone16
	, public _M2K_Beeper
{
	BEGIN_MSG_MAP(Device_M2K)
		MESSAGE_RANGE_HANDLER(CMD_DEV_CONTROL_FIRST, CMD_DEV_CONTROL_LAST, OnDeviceControl)
		CHAIN_MSG_MAP(_M2K_Beeper)
		CHAIN_MSG_MAP(_VDevicePhone16)
	END_MSG_MAP()
public:
	Device_M2K()
	{
		m_lpszExpectProductName = _T("VOIP USB Phone"); 
	}
	virtual ~Device_M2K()
	{}

	virtual BOOL _AfterDeviceOpen();
	virtual BOOL _BeforeDeviceClose();
	virtual void _AfterDeviceLose(){}
	virtual BOOL _Pulsation();
	virtual void TraceSendData(USBTEL_COMM_16& rTraceData);
	virtual void TraceReadData(USBTEL_COMM_16& rTraceData);

protected:
	BOOL GetKeyEvent();

private:
	LRESULT OnDeviceControl(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
	{
		bHandled = FALSE;
		return 0;
	}
};

#endif // !defined(__DEVICE_M2K_H__)
